/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sisvoto.modeloTablas;

import java.awt.Component;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author Dianita
 */
public class BotonCellRenderer implements TableCellRenderer {

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        if (value instanceof JButton) {
            return (JButton) value;
        }
        if (value instanceof JTextField) {
            return (JTextField) value;
        }

        if (value instanceof JComboBox) {
            return (JComboBox) value;
        }
        return null;
    }
}
